package com.mswork.mes.controller;

import com.mswork.common.core.controller.BaseController;
import com.mswork.common.core.domain.AjaxResult;
import com.mswork.common.core.page.TableDataInfo;
import com.mswork.mes.domain.Project;
import com.mswork.mes.domain.ProjectCargo;
import com.mswork.mes.domain.StoreOrder;
import com.mswork.mes.service.IProjectExtendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 项目管理Controller
 *
 * @author manshu
 * @date 2025-03-03
 */
@RestController
@RequestMapping("/mes/projectExtend")
public class ProjectExtendController extends BaseController {

    @Autowired
    private IProjectExtendService projectExtendService;

    /**
     * 查询项目管理列表
     */
//    @PreAuthorize("@ss.hasPermi('mes:project:list')")
    @GetMapping("/project/list")
    public AjaxResult projectSelect(StoreOrder storeOrder) {
        return AjaxResult.success(projectExtendService.getProjectSelect(storeOrder));
    }

    /**
     * 查询货物列表
     */
//    @PreAuthorize("@ss.hasPermi('mes:projectCargo:list')")
    @GetMapping("/projectCargo/list")
    public AjaxResult projectCargoList(StoreOrder storeOrder) {
        return AjaxResult.success(projectExtendService.getProjectCargoList(storeOrder));
    }
}
